#pragma once

#include <QDialog>
#include "ui_connectdialog.h"

QT_BEGIN_NAMESPACE
namespace Ui { class ConnectDialogClass; };
QT_END_NAMESPACE

enum ConnectType {
	CANCEL = 0,
	CONNECT = 1,
	DISCONNECT = 2,
	UNKNOWN_TYPE
};

class ConnectDialog : public QDialog
{
	Q_OBJECT

public:
	ConnectDialog(QWidget *parent = nullptr);
	
	QString getIp() {
		return ip_;
	}

	uint16_t getPort() {
		return port_;
	}

	~ConnectDialog();
	
	void init();

public slots:

	void onConnectBtnClicked();

	void onDisconnectBtnClicked();

private:
	QString ip_;
	uint16_t port_;

private:
	Ui::ConnectDialogClass *ui;
};
